# coding=utf-8

from flask import Blueprint


api = Blueprint('api', __name__)

# 把拆分出去的蓝图对象导入到创建蓝图的地方
from . import register, passport, house, orders


@api.after_request
def after_request(response):
    """在每次请求结束后,设置默认的响应报文格式为application/json"""
    if response.headers.get('Content-Type').startswith('text'):
        response.headers['Content-Type'] = 'application/json'
    return response